package com.layfuture.lftserver.product;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@Slf4j
@RestController
@RequiredArgsConstructor
public class ProductController {

    @RequestMapping("/")
    String home() {
        log.info("home() has been called");
        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd hh-mm-ss");
        String dateTime = LocalDateTime.now().format(df);
        log.info(dateTime);
        return "Hello World!";
    }


}
